package com.chushouya.order.service.admin.impl;

import com.chushouya.order.constants.AlipaySpiCommerceEnum;
import com.chushouya.order.service.admin.AlipaySpiCommerceService;
import com.general.framework.core.exception.Ex;
import com.general.framework.core.lang.Jsons;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
@Slf4j
public class AlipaySpiCommerceServiceImpl implements AlipaySpiCommerceService {


    @Override
    public Object alipaySpiCommerceCallBack(Map<String, String> requestToMap) {
        log.info("支付宝网关回调参数:{}", Jsons.toFormatJsonString(requestToMap));
        final String method = requestToMap.get("method");
        log.info("支付宝网关回调方法:{}", method);
        final AlipaySpiCommerceEnum alipaySpiCommerceEnum = AlipaySpiCommerceEnum.get(method);
        switch (alipaySpiCommerceEnum) {
        }
        throw Ex.business("支付宝网关回调方法不存在, method:{}", method);
    }

}
